package com.gdust.gkyx.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gdust.gkyx.model.product.Attr;
import com.gdust.gkyx.product.mapper.AttrMapper;
import com.gdust.gkyx.product.service.AttrService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName: AttrServiceImpl
 * Package: com.gdust.gkyx.product.service.impl
 * Description:商品属性 服务实现类
 *
 * @Author syun
 * @Create 2025/1/25 9:29
 * @Version 1.0
 */
@Service
public class AttrServiceImpl extends ServiceImpl<AttrMapper, Attr> implements AttrService {

    /**
     * //根据平台属性分组id查询
     * @param groupId 分组id
     * @return
     */
    @Override
    public List<Attr> getAttrListByGroupId(Long groupId) {
        LambdaQueryWrapper<Attr> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(Attr::getAttrGroupId,groupId);
        List<Attr> list = baseMapper.selectList(wrapper);
        return list;
    }

}
